<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>健康档案详情</title>
    <link rel="stylesheet" href="../css/page-health-orderInfo.css"/>
    <link rel="stylesheet" href="../plugins/elementui/index.css"/>
    <script src="../plugins/jquery/dist/jquery.min.js"></script>
    <script src="../plugins/healthmobile.js"></script>
    <script src="../plugins/datapicker/datePicker.js"></script>
    <script src="../plugins/vue/vue.js"></script>
    <script src="../plugins/vue/axios-0.18.0.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <link rel="stylesheet" href="../css/page-health-recordDetail.css"/>
</head>

<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div class="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
        <span class="center">传智健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">


        <div class="list-content">

            <div id="app">
                <div class="fix-info">
                    <ul class="list-unstyled ">
                        <li>
                            <div class="block">
                                <span><span>&nbsp&nbsp&nbsp&nbsp</span>
                                <el-date-picker
                                        v-model="value1"
                                        type="daterange"
                                        range-separator="至"
                                        start-placeholder="开始日期"
                                        end-placeholder="结束日期"
                                >
                                </el-date-picker>
                                </span>
                                <span>
                                    <span @click="findCondition" style="color: gray">搜索
                                        <i class="el-icon-search"></i>
                                    </span>
                                </span>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="fix-info" v-for="order in list">

                    <ul class="mui-list-unstyled ">
                        <li><span class="tit">日期</span><span class="info" v-text="order.date"></span></li>
                        <li><span class="tit">预约人</span><span class="info" v-text="order.name"></span></li>
                        <li><span class="tit">预约套餐</span><span class="info" v-text="order.setmeal"></span></li>
                        <li><span class="tit">到诊状态</span><span class="info" v-text="order.status"></span></li>
                        <li><span class="tit">体检机构</span><span class="info" v-text="order.his"></span></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<!-- <script src="health-index.js"></script> -->
<script>
    new Vue({
        el: '#app',
        data: {
            list: [
                {date: "2019-10-10", name: '张小花'},
                {date: "2019-10-11", name: '李四'},
                {date: "2019-10-12", name: '王五'},

            ],

            pickerOptions: {
                disabledDate(time) {
                    return time.getTime() > Date.now();
                },
                shortcuts: []
            },
            value1: '',

        },
        methods: {
            demo() {
                alert(this.value1);
            },
            //是否有登录
            isLogin() {
                axios.post("/login/isLogin.do").then((response) => {
                    if (response.data.flag) {
                        this.memberInfo = response.data.data;
                    } else {
                        window.location = 'http://localhost/pages/login.html';
                    }
                });
            },
            findCondition() {
                var _this = this;
                var dates = {};
                if (this.value1 != null && typeof(this.value1 != undefined)){
                    dates = {
                        start:this.value1[0],
                        end:this.value1[1]
                    };
                }else{
                    dates = {};
                }
                axios.post('/login/findCondition.do', dates).then((res) => {
                    if (res.data.flag) {
                        _this.list = res.data.data;
                    } else {
                        _this.$message.error(res.data.message);
                    }
                });
            }
        },
        beforeCreate() {
            this.isLogin();
        },
        created() {
            this.findCondition();
        },

    });
</script>

</body>